<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link type="text/css" rel="stylesheet" href="view/default/style/basic.css" />
<link type="text/css" rel="stylesheet" href="view/default/style/member.css" />
<script type="text/javascript" src="view/default/js/ajax.js"></script>
<script type="text/javascript" src="view/default/js/member.js"></script>
<title>在线商城会员中心</title>
</head>
<body>
{include file="default/public/header.html"}
<div id="sait">
    当前位置：<a href="./">首页</a> &gt; 注册会员
</div>

{include file="default/public/member_sidebar.html"}

<div id="main">
    <h2>订单列表</h2>
    <table cellspacing="1">
        <tr><th>订单号</th><th>下单时间</th><th>总金额</th><th>订单状态</th><th>操作</th></tr>
        {foreach from=$AllOrder key=key item=value}
        <tr><td><a href="?a=member&m=order_details&id={$value->id}">{$value->ordernum}</a></td><td>{$value->date}</td><td>{$value->price}</td><td>
        {if $value->order_state == '已取消'}
            <span style="color:red">已取消</span>
        {else}
            {if $value->refund == 1}
                <span style="color:#666">申请退款中</span>
            {else}
                {if $value->refund == 2}
                    <span style="color:green;">成功退款</span>
                {else}
                    {if $value->order_delivery == '已发货'}
                         <span style="color:green">已发货</span>
                    {else}
                        {if $value->order_delivery == '已配货'}
                            <span style="color:green">已配货,等待发货</span>
                        {else}
                            {if $value->order_pay == '已付款'}
                                <span style="color:green">已付款</span>
                            {else}
                                {if $value->order_state == '已确认'}
                                    <span style="color:green">已确认，等到收款</span>
                                {else}
                                    <span style="color:#666">未确认</span>
                                {/if}
                            {/if}
                        {/if}
                    {/if}
                  {/if}
             {/if}   
        {/if}</td><td>
        {if $value->order_state == '已取消'}
            -----
        {else} 
            {if $value->order_pay == '已付款' || $value->order_delivery == '已配货' || $value->order_delivery == '已发货' }
                {if $value->refund == 1}
                    -----
                {else}
                    {if $value->refund == 2}
                    <a href="?a=member&m=reOrder&id={$value->id}">重新下单</a> | <a href="?a=member&m=cancel&id={$value->id}" onclick="return confirm('确认取消订单?') ? true : false;">取消</a>
                    {else}
                    <a href="?a=member&m=refund&id={$value->id}" onclick="return confirm('申请退款须知：\n\n1.已付款、已配货或已发货可申请退款；\n2.已付款或已配货的72小时确认退款；\n3.已发货的请寄回物品后72小时确认退款；\n\n 您真的要申请退款吗？') ? true : false;">申请退款</a>
                    {/if}
                {/if}
            {else}
            <a href="?a=member&m=alipay&id={$value->id}">支付宝支付</a> |      
            <a href="?a=member&m=cancel&id={$value->id}" onclick="return confirm('确认取消订单?') ? true : false;">取消</a>
            {/if}
        </td>
        {/if}
        </tr>
        {foreachelse}
        <tr><td colspan="5">没有任何订单</td></tr>
        {/foreach}
    </table>
    <div id="page">{$page}</div>
</div>
{include file='default/public/footer.html'}
</body>
</html>